﻿
namespace WeixinSDK.API
{
    /// <summary>
    /// 微信自定义菜单
    /// </summary>
    public static class CustomMenu
    {
        /// <summary>
        /// 使用接口创建自定义菜单
        /// </summary>
        /// <param name="accessToken"></param>
        /// <param name="jsonData"></param>
        /// <returns></returns>
        public static string Create(string access_token, string jsonData)
        {
            return WxApiHelper.HttpPost(access_token, WxApiHelper.Categroy.menu, WxApiHelper.Verb.create, jsonData);
        }

        /// <summary>
        /// 使用接口查询自定义菜单的结构
        /// </summary>
        /// <param name="accessToken"></param>
        /// <returns></returns>
        public static string Get(string access_token)
        {
            return WxApiHelper.HttpGet(access_token, WxApiHelper.Categroy.menu, WxApiHelper.Verb.get);
        }

        /// <summary>
        /// 使用接口删除当前使用的自定义菜单
        /// </summary>
        /// <param name="accessToken"></param>
        /// <returns></returns>
        public static string Delete(string access_token)
        {
            return WxApiHelper.HttpGet(access_token, WxApiHelper.Categroy.menu, WxApiHelper.Verb.delete);
        }
    }
}
